<?php
/**
 * List of available mission types.
 * 
 * @author Xavier VILAIN
 * @package Hive\Mission
 * 
 */

use Hive\Mission;
use Fox\Generator;
$xview = Xview::instance();

// Customizing
$customizing = Hive\Admin\Customizing::instance();
$customizing->trackSummaryPage(array('mod' => 'missions','act'=>'types','sac'=> null));
if(!Fox\Authorization\Manager::check(Hive\Admin\Customizing::AUTH_MISSION_TYPES)) {
	echo $xview->accessDenied(Msg(Hive::BUNDLE,Hive::ERR_ADMIN_ACCES_DENIED),null,true);
	exit;
}

$screen = new Fox\Html\Screen('sCustomizing');
$screen->pageTitle(Msg(Hive::BUNDLE,Hive::MISSION_TYPES_CUSTOMIZING));
$screen->message(Msg(Hive::BUNDLE,Hive::MISSION_TYPES_CUSTOMIZING_HELP));

// Load All types and display the data grid
$types = Fox\Dao::finder(Mission\Type::className())
	->find();
$grid = new Fox\Grid('gTypes',Generator::url('missions','types',null,array('reload' => true)));
$grid->fieldcat(array('type'));

echo $screen->display();